home *** CD-ROM | disk | FTP | other *** search
/ USGS: Geolgic Assessment … in the Colorado Plataeu / USGS Geolgic Assessment of Coal in the Colorado Plataeu - Disc 1.iso / ArcView_Data_Pub / program / EXT32 / IMAGINE.AVX < prev    next >
Text File  |  1998-07-17  |  5KB  |  52 lines

  1. /3.1
  2. (Extension.1
  3.     Name:    "IMAGINE Image Support"
  4.     Dependencies:    "$AVBIN/imgn.dll\n"
  5.     FirstRootClassName:    "Script"
  6.     Roots:    2
  7.     Version:    30
  8.     About:    "Extends ArcView to support ERDAS IMAGINE images (v3.1)."
  9.     LoadScript:    3
  10.     CanUnloadScript:    4
  11.     UnloadScript:    5
  12.     InstallScript:    6
  13.     UninstallScript:    7
  14.     ExtVersion:    3100
  15. )
  16.  
  17. (Script.2
  18.     Name:    "Imagine.ObjectsPresent"
  19.     SourceCode:    "theProject = av.GetProject\nif (theProject = nil) then\n  return FALSE\nend\n\nfor each e in Clipboard.The\n  if (e.Is(ITheme)) then\n    theImgSrc = e.GetImgSrc\n    theSrcName = theImgSrc.GetSrcName\n    if (ImgCat.IsValidFileName(theSrcName.GetFileName)) then\n      if (theImgSrc.ContainType(ISrc.ReturnTypeFromFileExt(\"img\"))) then\n        return TRUE\n      end\n    else\n      if (theImgSrc.ReturnType = ISrc.ReturnTypeFromFileExt(\"img\")) then\n        return TRUE\n      end\n    end\n  elseif (e.Is(ViewFrame) and e.IsF
  20. illed) then\n    for each aTheme in e.GetView.GetThemes\n      if (aTheme.Is(ITheme)) then\n        theImgSrc = aTheme.GetImgSrc\n        theSrcName = theImgSrc.GetSrcName\n        if (ImgCat.IsValidFileName(theSrcName.GetFileName)) then\n          if (theImgSrc.ContainType(ISrc.ReturnTypeFromFileExt(\"img\"))) then\n            return TRUE\n          end\n        else\n          if (theImgSrc.ReturnType = ISrc.ReturnTypeFromFileExt(\"img\")) then\n            return TRUE\n          end\n        end\n      end\n    end\n  else
  21. if (e.Is(PictureFrame) and e.IsFilled and e.IsFilledBy(FileName)) then\n    theFillObj = e.GetFillObject\n    if (ISrc.IsValidFileName(theFillObj)) then\n      theISrc = ISrc.Make(SrcName.Make(theFillObj.AsString))\n      if (theISrc.ReturnType = ISrc.ReturnTypeFromFileExt(\"img\")) then\n        return TRUE\n      end\n    end\n  end\nend\ntheDocs = av.GetProject.GetDocs\nfor each aDoc in theDocs\n  if (aDoc.Is(View)) then\n    for each aTheme in aDoc.GetThemes\n      if (aTheme.Is(ITheme)) then\n        theImgSrc = aTheme
  22. .GetImgSrc\n        theSrcName = theImgSrc.GetSrcName\n        if (ImgCat.IsValidFileName(theSrcName.GetFileName)) then\n          if (theImgSrc.ContainType(ISrc.ReturnTypeFromFileExt(\"img\"))) then\n            return TRUE\n          end\n        else\n          if (theImgSrc.ReturnType = ISrc.ReturnTypeFromFileExt(\"img\")) then\n            return TRUE\n          end\n        end\n      end\n    end\n  elseif (aDoc.Is(Layout)) then\n    for each aGraphic in aDoc.GetGraphics\n      if (aGraphic.Is(PictureFrame) and aGraphi
  23. c.IsFilled and aGraphic.IsFilledBy(FileName)) then\n        theFillObj = aGraphic.GetFillObject\n        if (ISrc.IsValidFileName(theFillObj)) then\n          theISrc = ISrc.Make(SrcName.Make(theFillObj.AsString))\n          if (theISrc.ReturnType = ISrc.ReturnTypeFromFileExt(\"img\")) then\n            return TRUE\n          end\n        end\n      elseif (aGraphic.Is(ViewFrame) and aGraphic.IsFilled) then\n        for each aTheme in aGraphic.GetView.GetThemes\n          if (aTheme.Is(ITheme)) then\n            theImgS
  24. rc = aTheme.GetImgSrc\n            theSrcName = theImgSrc.GetSrcName\n            if (ImgCat.IsValidFileName(theSrcName.GetFileName)) then\n              if (theImgSrc.ContainType(ISrc.ReturnTypeFromFileExt(\"img\"))) then\n                return TRUE\n              end\n            else\n              if (theImgSrc.ReturnType = ISrc.ReturnTypeFromFileExt(\"img\")) then\n                return TRUE\n              end\n            end\n          end\n        end\n      end\n    end\n  end\nend\n\nreturn FALSE\n\n\n\n\n\n"
  25. )
  26.  
  27. (Script.3
  28.     Name:    "Imagine.Load"
  29.     SourceCode:    "' Add .img to the ISrc extension list\nextn_list = ISrc.ReturnExtensions\nextn_list = extn_list.Add(\"img\".AsString)\nISrc.SetExtensions(extn_list)"
  30. )
  31.  
  32. (Script.4
  33.     Name:    "Imagine.CanUnload"
  34.     SourceCode:    "' Run script Imagine.ObjectsPresent to see if there is any ImgSrc in any View with a .img extension.\n' Return result to boolean variable.\nobjectsPresent = av.Run(\"Imagine.ObjectsPresent\", NIL)\n\n' If objectsPresent is TRUE the dll should not be unloaded\nreturn objectsPresent.Not\n"
  35. )
  36.  
  37. (Script.5
  38.     Name:    "Imagine.Unload"
  39.     SourceCode:    "' Remove .img to the ISrc extension list\nextn_list = ISrc.ReturnExtensions\nimgIndex = extn_list.FindByValue(\"img\")\nif (imgIndex = -1) then return NIL end\nextn_list.Remove(imgIndex)\nISrc.SetExtensions(extn_list)"
  40. )
  41.  
  42. (Script.6
  43.     Name:    "Imagine.Install"
  44.     SourceCode:    "' script not used at this time"
  45. )
  46.  
  47. (Script.7
  48.     Name:    "Imagine.Uninstall"
  49.     SourceCode:    "' script not used at this time"
  50. )
  51.  
  52.